# -*- coding: utf-8 -*-

import webapp2
import handler

from google.appengine.ext.webapp.util import run_wsgi_app

routes = {
    webapp2.Route(
        "/",
        handler=handler.ViewList,
        name="show"
    ),
    webapp2.Route(
        "/add",
        handler=handler.AddPerson,
        name="add"
    ),
    webapp2.Route(
        "/input",
        handler = handler.InputPerson,
        name="input"
    ),
    webapp2.Route(
        "/delete",
        handler = handler.DeletePerson,
        name="delete"
    ),
    webapp2.Route(
        "/history",
        handler = handler.ShowHistory,
        name="history"
    ),
    webapp2.Route(
        "/error",
        handler=handler.Error,
        name="error"
    )
}

application = webapp2.WSGIApplication(routes, debug=True)

def main():
    run_wsgi_app(application)


if __name__ == "__main__":
    main()
